class Solution(object):
    def generate(self, numRows):
        """
        :type numRows: int
        :rtype: List[List[int]]
        """
        return_list = []
        for i in range(numRows):
            if i == 0:
                return_list.append([1])
            else:
                if i == 1:
                    return_list.append([1, 1])
                else:
                    new_list = [1]
                    last_list = return_list[-1]
                    for i in range(1, len(last_list)):
                        new_list.append(last_list[i - 1] + last_list[i])
                    new_list.append(1)
                    return_list.append(new_list)
        return return_list


data = Solution()
numsRows = 1
print(data.generate(numsRows))
